/**
package com.yl.paymanagement.rabbitmq;

import cn.hutool.extra.mail.MailUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.rabbitmq.client.Channel;
import com.yl.paymanagement.dao.YlFrontAccountDao;
import com.yl.paymanagement.service.RechargeRecodingService;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

@Configuration
public class EmailConsumer {
    @Autowired
    YlFrontAccountDao ylFrontAccountDao;

    @RabbitListener(queues = "queueSendEmail")
    public void receiveEmail(String msg, Message message, Channel channel) throws IOException {
        ObjectMapper objectMapper = new ObjectMapper();
        Map<String,String> map = objectMapper.readValue(message.getBody(), Map.class);
        MailUtil.send("577604267@qq.com", map.get("subject"),"成功充值"+map.get("total_amount"), false);

    }

}
*/
